<?php
	foreach($_POST as $key=>$el){
		if (is_string($_POST[$key])) {
			$_POST[$key] = trim($_POST[$key]);
			$_POST[$key] = addslashes($_POST[$key]);
		}
	}
	
	if ($mod == "siteblocker") {
		if ($act == 'onandoff'){
			if (isset($_POST['status']) && ($_POST['status'] == "on")){
				$siteblockerclass->site_status(1);
			} else {
				$siteblockerclass->site_status(0);
			}
		} elseif ($act == 'save'){
			$siteblockerclass->save_settings($_POST);
		}
	} elseif ($mod == "import") {
		if ($act == 'maxmindfile'){
			if (isset($_FILES['import']['type']) && ($_FILES['import']['error'] == 0)){
				$siteblockerclass->import_from_maxmind_file($_FILES['import']);
			}
		}
	}
?>